package myky.com.doctorapp.model;

import java.util.List;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import myky.com.doctorapp.api.ApiManager;
import myky.com.doctorapp.entity.LoginSuccessEntity;
import myky.com.doctorapp.entity.NewConsultListBean;
import myky.com.doctorapp.base.BaseEntity;
import myky.com.doctorapp.contract.PwLoginFragmentContract;

/**
 * @author Mr.li
 */
public class PwLoginFragmentModel implements PwLoginFragmentContract.Model {
    @Override
    public Observable<BaseEntity<LoginSuccessEntity.PayLoadBean>> login() {
        return ApiManager.getApistore().loginApi().subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }


    @Override
    public Observable<BaseEntity<List<NewConsultListBean.PayLoadBean.SpecialistConsultsBean>>> cgetlist(String size) {

        return ApiManager.getApistore().getList(size).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
